#include <stdio.h>

int result = 0;

void Move(int n, int start, int goal, int temp)
{
    if (n >= 1)
    {
        Move(n - 1, start, temp, goal);
        printf("Move disk %d from %d to %d\n", n, start, goal);
        result++;
        Move(n - 1, temp, goal, start);
    }
}

int main()
{
    Move(5, 1, 3, 2);
    printf("----------------\n");
    printf("Total %d moves\n", result);
    return 1;
}